/**
 * @author htqw
 * @param {import("mysql2").Connection} connection 
 */

export default function end(connection) {
    return new Promise((resolve, reject) => {
        connection.end(err => {
            if (err) 
                reject(err);
            else 
                resolve();
        });
    })
}